<%
class LoginAction
  public Sub index()
	    that.display ""
    end sub
	sub do_login
		dim rs
		
		if isEmpty( that.form("username") ) Then
			call that.error("您访问的页面不存在！！")
		End If


		set rs = M_("user").db.where( "username = '" & that.form("username") & "'" ).find()

		if POP_MVC.count(rs) < 1 Then
			set rs = nothing
			call that.error("用户<strong>" & that.form("username") & "</strong>不存在")
		End If

		if rs("password") <> md5(that.form("password")) Then
			set rs = nothing
			call that.error("密码错误")
		End If
	
		if rs("status") = 0 Then
			set rs = nothing
			call that.error("你被禁止登陆后台")
		End If

		
		Call S_( array("name" , rs))

		call that.success( array("登陆成功", U_("Index/index") ,1) )

	End Sub
	
	public sub verify
		call that.verify
	end sub
	
	sub Logout
		session.contents.remove("name")
		call that.redirect( "Login/index" )
	End sub
End Class
%>